import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description: 判断文件是否存在，是否是目录/文件
 */
public class FileTest2 {
    public static void main(String[] args) {
//        File file = new File("d:/test.txt");
//        System.out.println(file.exists());
//        System.out.println(file.isDirectory());
//        System.out.println(file.isFile());
        File file = new File("./test.txt");
        System.out.println(file.exists());
        System.out.println(file.isDirectory());
        System.out.println(file.isFile());
    }
}
